<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div></div>
    <script>
        var search = document.location.search;
        console.log(search);
        // div.innerHTML = `信息：${search}`;
        var name1 = search.split('&');
        console.log(name1);
        var name2 = decodeURI(name1[0].slice(10));
        console.log(name2);
        var div = document.querySelector('div');
        div.innerHTML = "欢迎你，" + name2;
        // window.localStorage.getItem('username');
        // window.sessionStorage.getItem('username');
    </script>
</body>

</html>